package pl.controller;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class UniversalHtmController {

    protected final Log logger = LogFactory.getLog(getClass());

    @RequestMapping("/*.htm")
    public ModelMap handleRequest(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
            logger.debug("UniversalHtmController.handleRequest " + request.getRequestURL());
        return new ModelMap();
    }
    
    @RequestMapping("/*/*.htm")
    public ModelMap handleRequest2(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
            logger.debug("UniversalHtmController2.handleRequest " + request.getRequestURL());
        return handleRequest(request, response);
    }
    
    @RequestMapping("/insertSampleObjects.htm")
    public ModelMap insertSampleObjects(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
            logger.debug("UniversalHtmController2.handleRequest " + request.getRequestURL());
       
    
            return new ModelMap();
    }
}
